]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Remove st_get_align_factor() utility method
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Oct 2019 21:29:06 +0000 (23:29 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 4 Nov 2019 20:23:32 +0000 (21:23 +0100)
It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

src/st/st-widget.c
src/st/st-widget.h

index f7e30849477d600f0f44bd252e846974c5f91bc9..586954b4687ded2e8a9e3de39bcc42324d78636d 100644 (file)
@@ -3112,63 +3112,3 @@ st_widget_get_focus_chain (StWidget *widget)
 {
   return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget);
 }
-
-/**
- * st_get_align_factors:
- * @x_align: an #StAlign
- * @y_align: an #StAlign
- * @x_align_out: (out) (optional): @x_align as a #gdouble
- * @y_align_out: (out) (optional): @y_align as a #gdouble
- *
- * Converts @x_align and @y_align to #gdouble values.
- */
-void
-st_get_align_factors (StAlign   x_align,
-                      StAlign   y_align,
-                      gdouble  *x_align_out,
-                      gdouble  *y_align_out)
-{
-  if (x_align_out)
-    {
-      switch (x_align)
-        {
-        case ST_ALIGN_START:
-          *x_align_out = 0.0;
-          break;
-
-        case ST_ALIGN_MIDDLE:
-          *x_align_out = 0.5;
-          break;
-
-        case ST_ALIGN_END:
-          *x_align_out = 1.0;
-          break;
-
-        default:
-          g_warn_if_reached ();
-          break;
-        }
-    }
-
-  if (y_align_out)
-    {
-      switch (y_align)
-        {
-        case ST_ALIGN_START:
-          *y_align_out = 0.0;
-          break;
-
-        case ST_ALIGN_MIDDLE:
-          *y_align_out = 0.5;
-          break;
-
-        case ST_ALIGN_END:
-          *y_align_out = 1.0;
-          break;
-
-        default:
-          g_warn_if_reached ();
-          break;
-        }
-    }
-}
index d6e3ca2bf2cf495e59e32f1436509e5f6f875cbb..2f593e3d34c2a1523318fe94ff367b93208effe3 100644 (file)
@@ -157,12 +157,6 @@ void                  st_widget_set_accessible_name      (StWidget    *widget,
 const gchar *         st_widget_get_accessible_name      (StWidget    *widget);
 void                  st_widget_set_accessible           (StWidget    *widget,
                                                           AtkObject   *accessible);
-/* utility methods */
-void st_get_align_factors (StAlign   x_align,
-                           StAlign   y_align,
-                           gdouble  *x_align_out,
-                           gdouble  *y_align_out);
-
 G_END_DECLS
 
 #endif /* __ST_WIDGET_H__ */